<template>
  <div class="nav">
          <el-menu
          background-color="#1A1B20"
          default-active="/profile"
          class="el-menu-vertical-demo"
          text-color="#fff"
          router="router"
          unique-opened="unique-opened"
          style="min-height: 100vh;text-align: left"
          >
          <el-menu-item index="/profile">
            <template>
              <i class="el-icon-menu"></i>
              <span>首页</span>
            </template>
          </el-menu-item>
          <el-submenu :index="menu.path" v-for="menu in menuList">
            <template slot="title">
              <i :class="menu.ico"></i>
              <span>{{menu.title}}</span>
            </template>
            <el-menu-item v-if="item" v-for="item in menu.child" :index="item.path">{{item.title}}</el-menu-item>
          </el-submenu>
          </el-menu>
  </div>
</template>
<script>
export default {
  name: "Nav",
  data() {
    return {
      menuList:[
        {
          title:'个人管理',
          path:'1',
          ico:'el-icon-menu',
          child:[
            {title:'个人中心', path:'/person', ico:''},
            {title:'个人设置', path:'/personSet', ico:''},
          ]
        }
      ]
    }
  },
  methods: {

  },

}
</script>

<style scoped>

</style>